/*    */ package com.gopay.bis.gdb.wap.gfbank.payment.merchant;
/*    */ 
/*    */ import java.io.DataInputStream;
/*    */ import java.io.File;
/*    */ import java.io.IOException;
/*    */ import java.io.PrintStream;
/*    */ import java.net.MalformedURLException;
/*    */ import java.net.URL;
/*    */ 
/*    */ class DoQuery extends Thread
/*    */ {
/*    */   PrintStream out;
/*    */   String urlreq;
/*    */ 
/*    */   public DoQuery(String req, PrintStream out)
/*    */   {
/* 16 */     this.urlreq = req;
/*    */ 
/* 18 */     this.out = out;
/*    */   }
/*    */ 
/*    */   public void run()
/*    */   {
/*    */     try {
/* 24 */       this.out.println("send request: " + this.urlreq);
/*    */ 
/* 26 */       URL url = new URL(this.urlreq);
/*    */ 
/* 29 */       DataInputStream dis = new DataInputStream(url.openStream());
/*    */       String line;
/* 31 */       for (int i = 0; (line = dis.readLine()) != null; i++)
/*    */       {
/*    */         //String line;
/* 33 */         this.out.println(line);
/* 34 */         String oo = "The order doesn't exist";
/* 35 */         if (!line.regionMatches(0, oo, 0, oo.length()))
/*    */           continue;
/* 37 */         getridof(line);
/*    */       }
/*    */ 
/* 41 */       dis.close();
/*    */     }
/*    */     catch (MalformedURLException e) {
/* 44 */       System.err.println(e);
/*    */     }
/*    */     catch (IOException e) {
/* 47 */       System.err.println(e);
/*    */     }
/*    */   }
/*    */ 
/*    */   public void getridof(String line) {
/*    */     try {
/* 53 */       String orderid = line.substring(line.length() - PLQuery.orderid_length);
/* 54 */       this.out.println("removing orderid:[" + orderid + "]");
/* 55 */       File f = new File(PLQuery.path + "/" + orderid);
/* 56 */       if (f.exists())
/*    */       {
/* 58 */         f.delete();
/* 59 */         this.out.println("orderid invalid,removed:[" + orderid + "]");
/*    */       }
/*    */       else
/*    */       {
/* 63 */         this.out.println("can't remove orderid[" + orderid + "], file no found:[" + PLQuery.path + "/" + orderid + "]");
/*    */       }
/*    */     } catch (Exception e) {
/* 66 */       e.printStackTrace(System.err);
/*    */     }
/*    */   }
/*    */ }

/* Location:           D:\桌面\广发银行\B2C支付签名验签工具包\JAVA版\gfgate\WEB-INF\classes\
 * Qualified Name:     gfbank.payment.merchant.DoQuery
 * JD-Core Version:    0.6.0
 */